/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package search;

import world.Point;

/**
 *
 * @author dheath
 */
public class WorldNode 
{
    private double cost;
    private Point topLeft;
    private int length;
    
    private WorldNode north;
    private WorldNode south;
    private WorldNode east;
    private WorldNode west;
    
    private WorldNode northWest;
    private WorldNode southWest;
    private WorldNode southEast;
    private WorldNode northEast;
    
    public WorldNode(Point center, int length)
    {
        this.topLeft = center;
        this.length = length;
        this.cost = length;
    }
    
    public Point getCenter()
    {
        return new Point(topLeft.getX()+(length/2.0), topLeft.getY()-(length/2.0));
    }
    public Point getTopLeft()
    {
        return topLeft;
    }

    public void setTopLeft(Point topLeft)
    {
        this.topLeft = topLeft;
    }

    public int getLength()
    {
        return length;
    }

    public void setLength(int length)
    {
        this.length = length;
    }

    public WorldNode getNorth()
    {
        return north;
    }

    public void setNorth(WorldNode north)
    {
        this.north = north;
    }

    public WorldNode getSouth()
    {
        return south;
    }

    public void setSouth(WorldNode south)
    {
        this.south = south;
    }

    public WorldNode getEast()
    {
        return east;
    }

    public void setEast(WorldNode east)
    {
        this.east = east;
    }

    public WorldNode getWest()
    {
        return west;
    }

    public void setWest(WorldNode west)
    {
        this.west = west;
    }

    public WorldNode getNorthWest()
    {
        return northWest;
    }

    public void setNorthWest(WorldNode northWest)
    {
        this.northWest = northWest;
    }

    public WorldNode getSouthWest()
    {
        return southWest;
    }

    public void setSouthWest(WorldNode southWest)
    {
        this.southWest = southWest;
    }

    public WorldNode getSouthEast()
    {
        return southEast;
    }

    public void setSouthEast(WorldNode southEast)
    {
        this.southEast = southEast;
    }

    public WorldNode getNorthEast()
    {
        return northEast;
    }

    public void setNorthEast(WorldNode northEast)
    {
        this.northEast = northEast;
    }

    public double getCost()
    {
        return cost;
    }

    public void setCost(double cost)
    {
        this.cost = cost;
    }
    
}
